Skip to content

Comments

Hide "Use Cache" checkbox in node editor for non-admin users in multiuser mode#65

Merged
lstein merged 2 commits intofeature/multiuserfrom
copilot/hide-cache-checkbox-non-admin
Feb 20, 2026
Merged

Hide "Use Cache" checkbox in node editor for non-admin users in multiuser mode#65
lstein merged 2 commits intofeature/multiuserfrom
copilot/hide-cache-checkbox-non-admin

Conversation

Copy link

Copilot AI commented Feb 20, 2026

Summary

In multiuser mode, the "Use Cache" checkbox in the node editor was visible and editable by all users. This change restricts it to admin users only, hiding it entirely for non-admins.

Changes:

  • UseCacheCheckbox.tsx: Added visibility guard using useGetSetupStatusQuery and selectCurrentUser — returns null when multiuser mode is enabled and the current user is not an admin. In single-user mode, behavior is unchanged (checkbox always visible).

Follows the same pattern established by useIsModelManagerEnabled.ts:

const isVisible = useMemo(() => {
  if (setupStatus && !setupStatus.multiuser_enabled) return true;
  return currentUser?.is_admin ?? false;
}, [setupStatus, currentUser]);

if (!isVisible) return null;

Related Issues / Discussions

QA Instructions

Multiuser mode (verify hidden for non-admin):

  1. Enable multiuser mode, log in as a non-admin user
  2. Open the node editor — confirm "Use Cache" checkbox is not present on any node

Multiuser mode (verify visible for admin):

  1. Log in as an admin user
  2. Open the node editor — confirm "Use Cache" checkbox is present and functional

Single-user mode:

  1. Disable multiuser mode
  2. Open the node editor — confirm "Use Cache" checkbox is visible as before

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)
Original prompt

This section details on the original issue you should resolve

<issue_title>[enhancement]: Hide cache checkbox in node editor when a non-admin user is logged in</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

No response

What should this feature add?

When a non-admin user is logged in in multiuser mode, the use cache checkbox in the nodes should be hidden. Only the administrator should be allowed to change node cache settings.

Alternatives

No response

Additional Content

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Copilot AI changed the title [WIP] Hide cache checkbox in node editor for non-admin users Hide "Use Cache" checkbox in node editor for non-admin users in multiuser mode Feb 20, 2026
Copilot AI requested a review from lstein February 20, 2026 04:54
@lstein lstein marked this pull request as ready for review February 20, 2026 04:54
@lstein lstein merged commit 7fff36d into feature/multiuser Feb 20, 2026
19 of 25 checks passed
@lstein lstein deleted the copilot/hide-cache-checkbox-non-admin branch February 20, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants